import http from '../utlis/http.js';
//招标详情
export const zhaoDetailApi = (id) => {
	return http({
		url: '/index/zhaoDetail',
		method: 'post',
		header: {
			'content-type': 'application/x-www-form-urlencoded'
		},
		data: {
			id,
			u_id: uni.getStorageSync('user').u_id,
			longitude: uni.getStorageSync('user').longitude || '',
			latitude: uni.getStorageSync('user').latitude || ''
		}
	})
}
//参与投标
export const addTouApi = (data) => {
	return http({
		url: '/index/addTou',
		method: 'post',
		header: {
			'content-type': 'application/x-www-form-urlencoded'
		},
		data
	})
}
//支付请求
export const wxpayApi = ({
	openid,
	price
}) => {
	return http({
		url: '/Wxpay/wxpay',
		method: 'post',
		header: {
			'content-type': 'application/x-www-form-urlencoded'
		},
		data: {
			openid,
			price
		}
	})
}
